﻿CREATE TABLE [dbo].[Consultation] (
    [Id]          INT            IDENTITY (1, 1) NOT NULL,
    [OpenId]      NVARCHAR (50)  NOT NULL,
    [UserId]      NVARCHAR (50)  NOT NULL,
    [CardNo]      NVARCHAR (50)  NULL,
    [AdminDt]     DATETIME       NULL,
    [PatientName] NVARCHAR (50)  NULL,
    [DoctorName]  NVARCHAR (50)  NULL,
    [Status]      INT            NULL,
    [AddDt]       DATETIME       NULL,
    [UpdateDt]    DATETIME       NULL,
    [DeleteDt]    DATETIME       NULL,
    [Memo]        NVARCHAR (200) NULL,
    [PatientId]   NVARCHAR (50)  NULL,
    [VisitNo]     NVARCHAR (50)  NULL,
    [RegType]     NVARCHAR (50)  NULL,
    [DeptId]      NVARCHAR (50)  NULL,
    [DeptName]    NVARCHAR (50)  NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'微信ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'OpenId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'企业号医生ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'UserId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊卡号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'CardNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'AdminDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'患者姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'PatientName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'医生姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'DoctorName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'咨询状态0-未支付 1-支付中 2-支付成功 3-支付失败4-退款中5-退款成功6-退款失败7-已结束', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'Status';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'AddDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'UpdateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'删除时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'DeleteDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'Memo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'PatientId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊序号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'VisitNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'号类别', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'RegType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'科室ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Consultation', @level2type = N'COLUMN', @level2name = N'DeptId';

